import {
  Skeleton,
  DataSet,
  Form,
  TextField,
  Button,
} from 'choerodon-ui/pro';
import React, { useMemo } from 'react';
import DateDs from './datePickerDs';



const DatePick: React.FC = (): React.ReactElement => {

  const timeDs: DataSet = useMemo(() => new DataSet(DateDs()), []);

  return (
    <Skeleton
      paragraph={{
      rows: 5,
      style: { width: '100vw' },
      }}
      active
      dataSet={timeDs}
      skeletonTitile={false}
    >
      <Form header="刷新表单" dataSet={timeDs}>
        <TextField name="userid" />
        <TextField name="name" />
      </Form>
      <div>
        <Button onClick={() => timeDs.query()}>
          点击触发DS查询
        </Button>
      </div>
    </Skeleton>
  );
};

export default DatePick;